/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



jQuery(document).ready(function() {
    jQuery('.form-checkboxes input').bind('click', disableOrg);
});

function disableOrg() {
    var seller = document.getElementById('edit-roles-5');
    var sponsor = document.getElementById('edit-roles-6');
    var agent = document.getElementById('edit-roles-3');

    if (seller.checked != true && sponsor.checked != true) {
        document.getElementById("edit-field-profile-org-nid-nid-wrapper").setAttribute("style", 'display:none');
        document.getElementById("edit-field-student-grade-value-wrapper").setAttribute("style", 'display:none');
    } else {
        document.getElementById("edit-field-profile-org-nid-nid-wrapper").setAttribute("style", 'display:display');
        document.getElementById("edit-field-student-grade-value-wrapper").setAttribute("style", 'display:display');
    }
} 